#!/usr/bin/python
# -*- coding: utf-8 -*-
#Create Time : 2006-6-9 13:26:54
#Create By User : oguard

from django.db import models
from django.db.models.base import Model
from django.db.models.fields import CharField
from django.db.models.fields.related import ForeignKey


# Create your models here.
class MediaTable( models.Model ):
    '''media table , storage all media infomations

    sample uuid = '{6ba7b810-9dad-11d1-80b4-00c04fd430c8}'
    '''

    media_uuid = CharField( maxlength=36, db_index=True, unique=True, help_text='媒体标记' )
    media_name = CharField( maxlength=256, db_index=True, help_text='媒体名称' )
    media_path = CharField( maxlength=2048, help_text='媒体路径' )
    media_cover = CharField ( maxlength=2048, help_text='媒体封面图片路径', default='' )
    
    class Admin:
        pass
    
    def __str__( self ):
        pass

class MediaCategoryTable( models.Model ):
    '''movie categroy name
    '''

    category_name = CharField( maxlength=80, help_text='分类名称' )
    
    class Admin:
        pass

class MediaCategoryList( models.Model ):
    ''' media's category table
    '''
    media_uuid = ForeignKey( MediaTable, to_field='media_uuid', help_text='媒体标记' )
    media_category =ForeignKey( MediaCategoryTable, help_text='分类名称' )
    
    class Admin:
        pass

class LastMediaList( models.Model ):
    '''storage lastest movie infomations
    '''
    media_uuid = ForeignKey( MediaTable, to_field='media_uuid', help_text='媒体标记' )
    
    class Admin:
        pass

class PopMediaList( models.Model ):
    '''storage all popularity media
    '''

    media_uuid = ForeignKey( MediaTable, to_field='media_uuid', help_text='媒体标记' )
    
    class Admin:
        pass

class RecommendMediaList( models.Model ):
    '''storage all admin recommend media
    '''

    media_uuid = ForeignKey( MediaTable, to_field='media_uuid', help_text='媒体标记' )
    
    class Admin:
        pass

#===============================================================================
# blow this line， maybe rewrite after understand  django user table model API
#===============================================================================

#===============================================================================
#class News( models.Model ):
#    '''all site news in here
#    '''
#
#    news_name = CharField( maxlength=256 )
#    news_data = DateField( auto_now_add=ctime() )
#    news_submiter = ForeignKey( UserTable )
#    news_content = TextField()
#
#class CommentTable( models.Model ):
#    '''user comment table
#    '''
#
#    pass
#
#class UserRss( models.Model ):
#    ''' user-defined RSS link
#    '''
#===============================================================================
